package edu.gmu.projects.fireresponder.xml.alerts;

import com.cap12.cap.certaintyType;
import com.cap12.cap.msgTypeType;
import com.cap12.cap.scopeType;
import com.cap12.cap.severityType;
import com.cap12.cap.statusType;
import com.cap12.cap.urgencyType;

public class CapAlert extends Alert {

	public String sender;
	public int status;
	public int messageType;
	public String source;
	public int scope;

	public int category;
	public String event;
	public int urgency;
	public int severity;
	public int certainty;
	
	public CapAlert() {
		setStatus(statusType.ETEST);
		setMessageType(msgTypeType.EALERT);
		setScope(scopeType.EPUBLIC);
		setUrgency(urgencyType.EIMMEDIATE);
		setSeverity(severityType.EUNKNOWN);
		setCertainty(certaintyType.EOBSERVED);
	}
	
	protected void setSender(String sender) {
		this.sender = sender;
	}
	protected void setStatus(int status) {
		this.status = status;
	}
	protected void setMessageType(int messageType) {
		this.messageType = messageType;
	}
	protected void setSource(String source) {
		this.source = source;
	}
	protected void setScope(int scope) {
		this.scope = scope;
	}
	protected void setCategory(int category) {
		this.category = category;
	}
	protected void setEvent(String event) {
		this.event = event;
	}
	protected void setUrgency(int urgency) {
		this.urgency = urgency;
	}
	protected void setSeverity(int severity) {
		this.severity = severity;
	}
	protected void setCertainty(int certainty) {
		this.certainty = certainty;
	}
	
	public String getSender() {
		return sender;
	}
	public int getStatus() {
		return status;
	}
	
	public int getMessageType() {
		return messageType;
	}

	public String getSource() {
		return source;
	}
	public int getScope() {
		return scope;
	}

	public int getUrgency() {
		return urgency;
	}

	public int getCategory() {
		return category;
	}

	public String getEvent() {
		return event;
	}
	
	public int getSeverity() {
		return severity;
	}

	public int getCertainty() {
		return certainty;
	}

	@Override
	public String generateXmlMsg() {
		AlertGenerator alts = new AlertGenerator();
		return alts.generateCapAlert(this);
	}
}
